#ifndef LESSONSELECTION_H
#define LESSONSELECTION_H

#include <QtGui/QWidget>
#include <QList>
#include "includes/lesson.h"

namespace Ui {
    class LessonSelection;
}

class LessonSelection : public QWidget {
    Q_OBJECT

public:
    LessonSelection(QWidget *parent = 0);
    ~LessonSelection();

public slots:
    void scanAndShow(QString dirOrFile);
    void sendCurrent();
    void updateLesson(Lesson newLesson);

    void outsideAction(QAction* action);

protected:
    void changeEvent(QEvent *e);

private:
    Ui::LessonSelection *m_ui;
    QList<Lesson> foundLessons;
    void deleteCurrent();

signals:
    void selectedLesson(Lesson ls);
};

#endif // LESSONSELECTION_H
